3.414 \(\int \frac{\cos ^4(c+d x)}{a-b \sin ^4(c+d x)} \, dx\)

Optimal. Leaf size=127 \[ \frac{\left (\sqrt{a}-\sqrt{b}\right )^{3/2} \tan ^{-1}\left (\frac{\sqrt{\sqrt{a}-\sqrt{b}} \tan (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} b d}+\frac{\left (\sqrt{a}+\sqrt{b}\right )^{3/2} \tan ^{-1}\left (\frac{\sqrt{\sqrt{a}+\sqrt{b}} \tan (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} b d}-\frac{x}{b} \]

[Out]

-(x/b) + ((Sqrt[a] - Sqrt[b])^(3/2)*ArcTan[(Sqrt[Sqrt[a] - Sqrt[b]]*Tan[c + d*x])/a^(1/4)])/(2*a^(3/4)*b*d) +
((Sqrt[a] + Sqrt[b])^(3/2)*ArcTan[(Sqrt[Sqrt[a] + Sqrt[b]]*Tan[c + d*x])/a^(1/4)])/(2*a^(3/4)*b*d)

________________________________________________________________________________________

Rubi [A]  time = 0.23546, antiderivative size = 127, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.208, Rules used = {3224, 1170, 203, 1166, 205} \[ \frac{\left (\sqrt{a}-\sqrt{b}\right )^{3/2} \tan ^{-1}\left (\frac{\sqrt{\sqrt{a}-\sqrt{b}} \tan (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} b d}+\frac{\left (\sqrt{a}+\sqrt{b}\right )^{3/2} \tan ^{-1}\left (\frac{\sqrt{\sqrt{a}+\sqrt{b}} \tan (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} b d}-\frac{x}{b} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^4/(a - b*Sin[c + d*x]^4),x]

[Out]

-(x/b) + ((Sqrt[a] - Sqrt[b])^(3/2)*ArcTan[(Sqrt[Sqrt[a] - Sqrt[b]]*Tan[c + d*x])/a^(1/4)])/(2*a^(3/4)*b*d) +
((Sqrt[a] + Sqrt[b])^(3/2)*ArcTan[(Sqrt[Sqrt[a] + Sqrt[b]]*Tan[c + d*x])/a^(1/4)])/(2*a^(3/4)*b*d)

Rule 3224

Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^4)^(p_.), x_Symbol] :> With[{ff = FreeF
actors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + 2*a*ff^2*x^2 + (a + b)*ff^4*x^4)^p/(1 + ff^2*x^2)^(m/2 + 2
*p + 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]

Rule 1170

Int[((d_) + (e_.)*(x_)^2)^(q_)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> Int[ExpandIntegrand[(d + e*x
^2)^q/(a + b*x^2 + c*x^4), x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a
*e^2, 0] && IntegerQ[q]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 1166

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Di
st[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^2), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), Int[1/(b/2 +
 q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^
2 - 4*a*c]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\cos ^4(c+d x)}{a-b \sin ^4(c+d x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right ) \left (a+2 a x^2+(a-b) x^4\right )} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \left (-\frac{1}{b \left (1+x^2\right )}+\frac{a+b+(a-b) x^2}{b \left (a+2 a x^2+(a-b) x^4\right )}\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{b d}+\frac{\operatorname{Subst}\left (\int \frac{a+b+(a-b) x^2}{a+2 a x^2+(a-b) x^4} \, dx,x,\tan (c+d x)\right )}{b d}\\ &=-\frac{x}{b}+\frac{\left (\left (1-\frac{\sqrt{b}}{\sqrt{a}}\right ) (a-b)\right ) \operatorname{Subst}\left (\int \frac{1}{a+\sqrt{a} \sqrt{b}+(a-b) x^2} \, dx,x,\tan (c+d x)\right )}{2 b d}+\frac{\left (\left (1+\frac{\sqrt{b}}{\sqrt{a}}\right ) (a-b)\right ) \operatorname{Subst}\left (\int \frac{1}{a-\sqrt{a} \sqrt{b}+(a-b) x^2} \, dx,x,\tan (c+d x)\right )}{2 b d}\\ &=-\frac{x}{b}+\frac{\left (\sqrt{a}-\sqrt{b}\right )^{3/2} \tan ^{-1}\left (\frac{\sqrt{\sqrt{a}-\sqrt{b}} \tan (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} b d}+\frac{\left (\sqrt{a}+\sqrt{b}\right )^{3/2} \tan ^{-1}\left (\frac{\sqrt{\sqrt{a}+\sqrt{b}} \tan (c+d x)}{\sqrt [4]{a}}\right )}{2 a^{3/4} b d}\\ \end{align*}

Mathematica [A]  time = 0.251548, size = 171, normalized size = 1.35 \[ \frac{\frac{\left (\sqrt{a}+\sqrt{b}\right )^2 \tan ^{-1}\left (\frac{\left (\sqrt{a}+\sqrt{b}\right ) \tan (c+d x)}{\sqrt{\sqrt{a} \sqrt{b}+a}}\right )}{\sqrt{a} \sqrt{\sqrt{a} \sqrt{b}+a}}-\frac{\left (\sqrt{a}-\sqrt{b}\right )^2 \tanh ^{-1}\left (\frac{\left (\sqrt{a}-\sqrt{b}\right ) \tan (c+d x)}{\sqrt{\sqrt{a} \sqrt{b}-a}}\right )}{\sqrt{a} \sqrt{\sqrt{a} \sqrt{b}-a}}-2 (c+d x)}{2 b d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^4/(a - b*Sin[c + d*x]^4),x]

[Out]

(-2*(c + d*x) + ((Sqrt[a] + Sqrt[b])^2*ArcTan[((Sqrt[a] + Sqrt[b])*Tan[c + d*x])/Sqrt[a + Sqrt[a]*Sqrt[b]]])/(
Sqrt[a]*Sqrt[a + Sqrt[a]*Sqrt[b]]) - ((Sqrt[a] - Sqrt[b])^2*ArcTanh[((Sqrt[a] - Sqrt[b])*Tan[c + d*x])/Sqrt[-a
 + Sqrt[a]*Sqrt[b]]])/(Sqrt[a]*Sqrt[-a + Sqrt[a]*Sqrt[b]]))/(2*b*d)

________________________________________________________________________________________

Maple [B]  time = 0.132, size = 449, normalized size = 3.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^4/(a-b*sin(d*x+c)^4),x)

[Out]

1/2/d/b*a/(((a*b)^(1/2)+a)*(a-b))^(1/2)*arctan((a-b)*tan(d*x+c)/(((a*b)^(1/2)+a)*(a-b))^(1/2))-1/2/d*a/(a*b)^(
1/2)/(((a*b)^(1/2)+a)*(a-b))^(1/2)*arctan((a-b)*tan(d*x+c)/(((a*b)^(1/2)+a)*(a-b))^(1/2))+1/2/d/b*a/(((a*b)^(1
/2)-a)*(a-b))^(1/2)*arctanh((-a+b)*tan(d*x+c)/(((a*b)^(1/2)-a)*(a-b))^(1/2))+1/2/d*a/(a*b)^(1/2)/(((a*b)^(1/2)
-a)*(a-b))^(1/2)*arctanh((-a+b)*tan(d*x+c)/(((a*b)^(1/2)-a)*(a-b))^(1/2))-1/2/d/(((a*b)^(1/2)+a)*(a-b))^(1/2)*
arctan((a-b)*tan(d*x+c)/(((a*b)^(1/2)+a)*(a-b))^(1/2))+1/2/d*b/(a*b)^(1/2)/(((a*b)^(1/2)+a)*(a-b))^(1/2)*arcta
n((a-b)*tan(d*x+c)/(((a*b)^(1/2)+a)*(a-b))^(1/2))-1/2/d/(((a*b)^(1/2)-a)*(a-b))^(1/2)*arctanh((-a+b)*tan(d*x+c
)/(((a*b)^(1/2)-a)*(a-b))^(1/2))-1/2/d*b/(a*b)^(1/2)/(((a*b)^(1/2)-a)*(a-b))^(1/2)*arctanh((-a+b)*tan(d*x+c)/(
((a*b)^(1/2)-a)*(a-b))^(1/2))-1/d/b*arctan(tan(d*x+c))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4/(a-b*sin(d*x+c)^4),x, algorithm="maxima")

[Out]

-(b*integrate(-8*(4*b^2*cos(6*d*x + 6*c)^2 + 4*b^2*cos(2*d*x + 2*c)^2 + 4*b^2*sin(6*d*x + 6*c)^2 + 4*b^2*sin(2
*d*x + 2*c)^2 + 4*(8*a^2 - 3*a*b)*cos(4*d*x + 4*c)^2 - b^2*cos(2*d*x + 2*c) + 4*(8*a^2 - 3*a*b)*sin(4*d*x + 4*
c)^2 + 6*(4*a*b - b^2)*sin(4*d*x + 4*c)*sin(2*d*x + 2*c) - (b^2*cos(6*d*x + 6*c) + 2*a*b*cos(4*d*x + 4*c) + b^
2*cos(2*d*x + 2*c))*cos(8*d*x + 8*c) + (8*b^2*cos(2*d*x + 2*c) - b^2 + 6*(4*a*b - b^2)*cos(4*d*x + 4*c))*cos(6
*d*x + 6*c) - 2*(a*b - 3*(4*a*b - b^2)*cos(2*d*x + 2*c))*cos(4*d*x + 4*c) - (b^2*sin(6*d*x + 6*c) + 2*a*b*sin(
4*d*x + 4*c) + b^2*sin(2*d*x + 2*c))*sin(8*d*x + 8*c) + 2*(4*b^2*sin(2*d*x + 2*c) + 3*(4*a*b - b^2)*sin(4*d*x
+ 4*c))*sin(6*d*x + 6*c))/(b^3*cos(8*d*x + 8*c)^2 + 16*b^3*cos(6*d*x + 6*c)^2 + 16*b^3*cos(2*d*x + 2*c)^2 + b^
3*sin(8*d*x + 8*c)^2 + 16*b^3*sin(6*d*x + 6*c)^2 + 16*b^3*sin(2*d*x + 2*c)^2 - 8*b^3*cos(2*d*x + 2*c) + b^3 +
4*(64*a^2*b - 48*a*b^2 + 9*b^3)*cos(4*d*x + 4*c)^2 + 4*(64*a^2*b - 48*a*b^2 + 9*b^3)*sin(4*d*x + 4*c)^2 + 16*(
8*a*b^2 - 3*b^3)*sin(4*d*x + 4*c)*sin(2*d*x + 2*c) - 2*(4*b^3*cos(6*d*x + 6*c) + 4*b^3*cos(2*d*x + 2*c) - b^3
+ 2*(8*a*b^2 - 3*b^3)*cos(4*d*x + 4*c))*cos(8*d*x + 8*c) + 8*(4*b^3*cos(2*d*x + 2*c) - b^3 + 2*(8*a*b^2 - 3*b^
3)*cos(4*d*x + 4*c))*cos(6*d*x + 6*c) - 4*(8*a*b^2 - 3*b^3 - 4*(8*a*b^2 - 3*b^3)*cos(2*d*x + 2*c))*cos(4*d*x +
 4*c) - 4*(2*b^3*sin(6*d*x + 6*c) + 2*b^3*sin(2*d*x + 2*c) + (8*a*b^2 - 3*b^3)*sin(4*d*x + 4*c))*sin(8*d*x + 8
*c) + 16*(2*b^3*sin(2*d*x + 2*c) + (8*a*b^2 - 3*b^3)*sin(4*d*x + 4*c))*sin(6*d*x + 6*c)), x) + x)/b

________________________________________________________________________________________

Fricas [B]  time = 3.91836, size = 2688, normalized size = 21.17 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4/(a-b*sin(d*x+c)^4),x, algorithm="fricas")

[Out]

1/8*(b*sqrt((a*b^2*d^2*sqrt((9*a^2 + 6*a*b + b^2)/(a^3*b^3*d^4)) - a - 3*b)/(a*b^2*d^2))*log(1/4*(3*a^2 - 2*a*
b - b^2)*cos(d*x + c)^2 - 3/4*a^2 + 1/2*a*b + 1/4*b^2 + 1/2*(a^3*b^2*d^3*sqrt((9*a^2 + 6*a*b + b^2)/(a^3*b^3*d
^4))*cos(d*x + c)*sin(d*x + c) + (3*a^2*b + a*b^2)*d*cos(d*x + c)*sin(d*x + c))*sqrt((a*b^2*d^2*sqrt((9*a^2 +
6*a*b + b^2)/(a^3*b^3*d^4)) - a - 3*b)/(a*b^2*d^2)) - 1/4*(2*(a^3*b - a^2*b^2)*d^2*cos(d*x + c)^2 - (a^3*b - a
^2*b^2)*d^2)*sqrt((9*a^2 + 6*a*b + b^2)/(a^3*b^3*d^4))) - b*sqrt((a*b^2*d^2*sqrt((9*a^2 + 6*a*b + b^2)/(a^3*b^
3*d^4)) - a - 3*b)/(a*b^2*d^2))*log(1/4*(3*a^2 - 2*a*b - b^2)*cos(d*x + c)^2 - 3/4*a^2 + 1/2*a*b + 1/4*b^2 - 1
/2*(a^3*b^2*d^3*sqrt((9*a^2 + 6*a*b + b^2)/(a^3*b^3*d^4))*cos(d*x + c)*sin(d*x + c) + (3*a^2*b + a*b^2)*d*cos(
d*x + c)*sin(d*x + c))*sqrt((a*b^2*d^2*sqrt((9*a^2 + 6*a*b + b^2)/(a^3*b^3*d^4)) - a - 3*b)/(a*b^2*d^2)) - 1/4
*(2*(a^3*b - a^2*b^2)*d^2*cos(d*x + c)^2 - (a^3*b - a^2*b^2)*d^2)*sqrt((9*a^2 + 6*a*b + b^2)/(a^3*b^3*d^4))) +
 b*sqrt(-(a*b^2*d^2*sqrt((9*a^2 + 6*a*b + b^2)/(a^3*b^3*d^4)) + a + 3*b)/(a*b^2*d^2))*log(-1/4*(3*a^2 - 2*a*b
- b^2)*cos(d*x + c)^2 + 3/4*a^2 - 1/2*a*b - 1/4*b^2 + 1/2*(a^3*b^2*d^3*sqrt((9*a^2 + 6*a*b + b^2)/(a^3*b^3*d^4
))*cos(d*x + c)*sin(d*x + c) - (3*a^2*b + a*b^2)*d*cos(d*x + c)*sin(d*x + c))*sqrt(-(a*b^2*d^2*sqrt((9*a^2 + 6
*a*b + b^2)/(a^3*b^3*d^4)) + a + 3*b)/(a*b^2*d^2)) - 1/4*(2*(a^3*b - a^2*b^2)*d^2*cos(d*x + c)^2 - (a^3*b - a^
2*b^2)*d^2)*sqrt((9*a^2 + 6*a*b + b^2)/(a^3*b^3*d^4))) - b*sqrt(-(a*b^2*d^2*sqrt((9*a^2 + 6*a*b + b^2)/(a^3*b^
3*d^4)) + a + 3*b)/(a*b^2*d^2))*log(-1/4*(3*a^2 - 2*a*b - b^2)*cos(d*x + c)^2 + 3/4*a^2 - 1/2*a*b - 1/4*b^2 -
1/2*(a^3*b^2*d^3*sqrt((9*a^2 + 6*a*b + b^2)/(a^3*b^3*d^4))*cos(d*x + c)*sin(d*x + c) - (3*a^2*b + a*b^2)*d*cos
(d*x + c)*sin(d*x + c))*sqrt(-(a*b^2*d^2*sqrt((9*a^2 + 6*a*b + b^2)/(a^3*b^3*d^4)) + a + 3*b)/(a*b^2*d^2)) - 1
/4*(2*(a^3*b - a^2*b^2)*d^2*cos(d*x + c)^2 - (a^3*b - a^2*b^2)*d^2)*sqrt((9*a^2 + 6*a*b + b^2)/(a^3*b^3*d^4)))
 - 8*x)/b

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**4/(a-b*sin(d*x+c)**4),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4/(a-b*sin(d*x+c)^4),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError